#inputrc
inputrc_file=~/.inputrc
content="set completion-ignore-case on"

if [ ! -f "$inputrc_file" ]; then
    # 文件不存在，创建并写入内容
    echo "$content" > "$inputrc_file"
else
    # 文件已存在，追加内容
    echo "$content" >> "$inputrc_file"
fi

#Nerd-Font
wget https://ghproxy.com/https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/IntelOneMono.tar.xz
tar -xvJf IntelOneMono.tar.xz -C InteloneMono

font_dir="$HOME/.fonts"

## install font
if [ ! -d "$font_dir" ]; then
    mkdir -p "$font_dir"
    echo "Created $font_dir"
else
    echo "$font_dir already exists"
fi

cd IntelOneMono && cp -r * $font_dir && fc-cache -f -v && cd -

#oh-my-bash

bash -c "$(curl -fsSL https://ghproxy.com/https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"

## change theme
sed -i 's/OSH_THEME="powerline"/OSH_THEME="font"/g' ~/.bashrc



# git

## gitconfig
git config --global user.name arashrun
git config --global user.email arashrun@qq.com
### 不对非英文解码
git config --global core.quotepath false
### 加速git clone下载速度
git config --global url."https://ghproxy.com/https://github.com".insteadOf "https://github.com"

## gitalias  --  https://github.com/GitAlias/gitalias
cd ~
curl https://ghproxy.com/https://raw.githubusercontent.com/GitAlias/gitalias/main/gitalias.txt -o gitalias.txt
git config --global include.path gitalias.txt
cd -
